package tools;


public enum StudentEnum {
    ONE(0,"赵"),TWO(1,"钱"),THREE(2,"孙"),FOUR(3,"李"),FIVE(4,"周"),SIX(5,"吴");

    private Integer code;
    private String name;

    StudentEnum(Integer code,String name)
    {
        this.code=code;
        this.name=name;
    }

    public Integer getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static StudentEnum forEach_StudentEnum(int index)
    {
        StudentEnum[] array = StudentEnum.values();
        for(StudentEnum studentEnum:array)
        {
            if(index == studentEnum.getCode())
            {
                return studentEnum;
            }
        }

        return null;
    }
}
